<script>
  class Weapon {
    handle() {
      console.log(`${this.name}被振了`)
    }
  }

  class ShortWeapon extends Weapon {
    constructor(name) {
      super()
      this.name = name
    }

    attack() {
      console.log(`${this.name}出一点零`)
    }
  }

  class LongWeapon extends Weapon {
    constructor(name) {
      super()
      this.name = name
    }

    skill() {
      console.log(`${this.name}放龙王破`)
    }
  }

  let wh = new ShortWeapon('金太刀')
  wh.attack()
  wh.handle()
  let ll = new LongWeapon('金长枪')
  ll.skill()
  ll.handle()
</script>
